Complexity of Sequential Pattern Matching Algorithms

نویسندگان

  • Mireille Régnier
  • Wojciech Szpankowski
چکیده

We formally define a class of sequential pattern matching algorithms that includes all variations of Morris-Pratt algorithm. For last twenty years it was known that complexity of such algorithms are bounded by a linear function of the text string length. Recenlly, substantial progress has been made in identifying lower bounds. However, it was not known whether really there exists asymptotically a linearity constant. We prove this fact rigorously for the worst case and the average case using Subadditive Ergodic Theorem. We additionally prove an almost sure cOIlvergence. Our results hold for any given pattern and text and for stationary ergodic pattern and text providing the length of the pattern is order of magnitude smaller than the square root of the text length. In the course of the proof, we also establish some structural property of Morris-Pratt-like algorithms. Namely, we prove the exlstence of "unavoidable positions" where the algorithm must stop to compare. This property seems to be uniquely reserved for Morris-Pratt type algorithms since as, we point out in our concluding remarks, a popular pattern matching algorithm proposed by Boyer and Moore does not possess this property.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Sequential and indexed two-dimensional combinatorial template matching allowing rotations

We present new and faster algorithms to search for a 2-dimensional pattern in a 2-dimensional text allowing any rotation of the pattern. This has applications such as image databases and computational biology. We consider the cases of exact and approximate matching under several matching models, using a combinatorial approach that generalizes string matching techniques. We focus on sequential a...

متن کامل

A Unified View to String Matching Algorithms

We present a uniied view to sequential algorithms for many pattern matching problems, using a nite automaton built from the pattern which uses the text as input. We show the limitations of deterministic nite automata (DFA) and the advantages of using a bitwise simulation of non-deterministic nite automata (NFA). This approach gives very fast practical algorithms which have good complexity for s...

متن کامل

View to String Matching Algorithms ? Ricardo

We present a uniied view to sequential algorithms for many pattern matching problems, using a nite automaton built from the pattern which uses the text as input. We show the limitations of deter-ministic nite automata (DFA) and the advantages of using a bitwise simulation of non-deterministic nite automata (NFA). This approach gives very fast practical algorithms which have good complexity for ...

متن کامل

Complexity of Sequential Pattern

We formally deene a class of sequential pattern matching algorithms that includes all variations of Morris-Pratt algorithm. For the last twenty years it was known that the complexity of such algorithms is bounded by a linear function of the text length. Recently, substantial progress has been made in identifying lower bounds. We now prove there exists asymptotically a linearity constant for the...

متن کامل

Approximate String Matching by Finite Automata

Abs t r ac t . Approximate string matching is a sequential problem and therefore it is possible to solve it using finite automata. A nondeterministic finite automaton is constructed for string matching with k mismatches. It is shown, how "dynamic programming" and "shift-and" based algorithms simulate this nondeterministic finite automaton. The corresponding deterministic finite automaton have O...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 1998